<link rel="stylesheet" href="/static/admin/js/jconfirm/jquery-confirm.min.css">

<!--页面主要内容-->
<main class="lyear-layout-content">

    <div class="container-fluid">

        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-toolbar clearfix">
                        <div class="toolbar-btn-action">
                            <a class="btn btn-primary m-r-5" onclick="delspace()"><i class="mdi mdi-plus"></i> 回收站</a>
                            <!-- <a class="btn btn-success m-r-5" href="#!"><i class="mdi mdi-check"></i> 启用</a> -->
                            <!-- <a class="btn btn-warning m-r-5" href="#!"><i class="mdi mdi-block-helper"></i> 禁用</a> -->
                            <a class="btn btn-danger" href="javascript:void(0)"><i class="mdi mdi-window-close"></i>
                                批量删除</a>
                        </div>
                    </div>
                    <div class="card-body">

                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>
                                            <label class="lyear-checkbox checkbox-primary">
                                                <input type="checkbox" id="check-all"><span></span>
                                            </label>
                                        </th>
                                        <th>标题</th>
                                        <th>所属分类</th>
                                        <th>悬赏积分</th>
                                        <th>发布人</th>
                                        <th>访问次数</th>
                                        <th>帖子状态</th>
                                        <th>附加功能</th>
                                        <th>发布时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {foreach $postlist as $item}
                                    <tr>
                                        <td align="center" style="width: 30px;">
                                            <label class="lyear-checkbox checkbox-primary">
                                                <input type="checkbox" name="ids[]" value=""><span></span>
                                            </label>
                                        </td>
                                        <td>{$item.title}</td>
                                        <td>{$item.cate.name}</td>
                                        <td>{$item.point}</td>
                                        <td>{$item.user.nickname}</td>
                                        <td>{$item.visit_text}</td>
                                        <td>{$item.accept ? '已采纳' : '未采纳'}</td>
                                        <td>{$item.state_text}</td>
                                        <td>{$item.createtime}</td>
                                        <td style="width: 300px;">
                                            <div class="btn-group">
                                                <a class="btn btn-xs btn-default" href="{:url('admin/post.post/edit')}"
                                                    title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                                                <a class="btn btn-xs btn-default btn-del" href="#!" data-id=""
                                                    title="删除" data-toggle="tooltip"><i
                                                        class="mdi mdi-window-close"></i></a>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>

</main>
<!--End 页面主要内容-->
<script src="/static/admin/js/jconfirm/jquery-confirm.min.js"></script>
<script src="/static/admin/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/static/admin/js/lightyear.js"></script>
<script type="text/javascript">
    function delspace() {
        var urlto = "{:url('admin/index/recycle')}";
        layer.open({
            title: '在线调试',
            type: 2,
            content: [urlto],//这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
            area: ['80%', '80%'],
            offset: '50px',
            end: function () {
                location.reload();
            }
        });
        var index = layer.load(2, { time: 1 * 1000 }); //又换了种风格，并且设定最长等待10秒

    }
</script>